package com.example.exam1;

public class ProxyFactory implements Factory {

    private Factory factory;

    public ProxyFactory(Factory factory) {
        this.factory = factory;
    }

    @Override
    public void product() {
        System.out.println("proxy before... ");
        factory.product();
        System.out.println("proxy after... ");
    }
}
